/*
 * @Author: luojie 
 * @Date: 2019-03-25 17:14:11 
 * @Last Modified by: luojie
 * @Last Modified time: 2019-10-15 21:58:08
 * element-ui组件
 */
import Vue from 'vue';
import {
  Pagination,
  Dialog,
  Input,
  InputNumber,
  Radio,
  RadioGroup,
  RadioButton,
  Checkbox,
  CheckboxButton,
  CheckboxGroup,
  Switch,
  Select,
  Option,
  OptionGroup,
  Button,
  ButtonGroup,
  Table,
  TableColumn,
  DatePicker,
  TimeSelect,
  TimePicker,
  Tooltip,
  Form,
  FormItem,
  
  Alert,
  Icon,
  Upload,
  Loading,
  MessageBox,
  Message,
  Notification,
  Row,
  Col,
  Popover,
  Badge,
  Tree,
  Tag,
  Timeline,
  TimelineItem,
  Progress,
  Cascader,
  Tabs,
  TabPane,
} from 'element-ui';
Vue.use(Popover);
Vue.use(Row);
Vue.use(Col);
Vue.use(Pagination);
Vue.use(Dialog);
Vue.use(Input);
Vue.use(InputNumber);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(RadioButton);
Vue.use(Checkbox);
Vue.use(CheckboxButton);
Vue.use(CheckboxGroup);
Vue.use(Switch);
Vue.use(Select);
Vue.use(Option);
Vue.use(OptionGroup);
Vue.use(Button);
Vue.use(ButtonGroup);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(DatePicker);
Vue.use(TimeSelect);
Vue.use(TimePicker);
Vue.use(Tooltip);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Alert);
Vue.use(Icon);
Vue.use(Upload);
Vue.use(Badge);
Vue.use(Tree);
Vue.use(Tag);
Vue.use(Timeline);
Vue.use(TimelineItem);
Vue.use(Progress);
Vue.use(Cascader);
Vue.use(Tabs);
Vue.use(TabPane);

Vue.use(Loading.directive);

Vue.prototype.$loading = Loading.service;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;

Vue.prototype.globalClick = function (callback) {
  document.getElementById('app').onclick = function (e) {
      callback(e);
  };
};